home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / segue.exe / NCOPIES.PRG < prev    next >
Text File  |  1991-10-28  |  1KB  |  45 lines

  1. *.............................................................................
  2. *
  3. *   Program Name: NCOPIES.PRG       Copyright: HRF Associates, Inc.                                     
  4. *   Date Created: 10/28/11           Language: Clipper                                             
  5. *   Time Created: 22:05:08             Author: Bob Fogle                                 
  6. *
  7. *.............................................................................
  8. * Supplemental SEGUE function for setting number of copies to be printed by spooler.
  9. * Functionally equivilent to N_COPIES function in NETLIB library except it provides
  10. * for 255 copies instead of 99.
  11. *
  12. FUNCTION NCOPIES_
  13. *Purpose : To specify banner page text.
  14. *Usage     : NCOPIES_([<expN1>])
  15. *        :
  16. * Where  : <expN1> = Copies [1..255]
  17. *        :
  18. PARAMETERS copies
  19. LOCAL mcopies
  20. PRIVATE rtn :=0
  21.  
  22. do while .t.
  23.   * Check to make sure passed variable types are correct.
  24.   if valtype(copies)<>'N' .AND. copies<>nil
  25.     rtn = -101
  26.     exit
  27.   endi
  28.  
  29.   * Set up defaults
  30.   mcopies =  if(valtype(copies)=='N',copies,0)
  31.   mcopies = if(mcopies=0,1,mcopies)  // Treat zero as one.
  32.  
  33.   * Get/Set copies (form) number
  34.   if pcount()=0             // If no arguments, return current setting.
  35.     rtn = PRJBDFG(5)        // Get Default Print Job Flags (Number of Copies)
  36.   else
  37.     rtn = PRJBDFS(,,,,mcopies)  // Set Default Print Job Flags (Number of Copies)
  38.   endi
  39.   exit
  40. endd
  41. RETURN rtn
  42.  
  43.  
  44.  
  45.